package com.example.config;

import com.example.bean.Dog;
import com.example.bean.DogFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan({"com.example.bean","com.example.config"})
public class SpringConfig3 {
//  我们发现她实际返回的不是FactoryBean而是他的FactoryBean实现的方法中生产出来的对象
    @Bean
    public DogFactoryBean dog(){
        return new DogFactoryBean();
    }
}
